package com.yunke.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 分销商实体类
 * 
 * @author yunke
 * @since 1.0.0
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("yunke_distributor")
@Schema(name = "YunkeDistributor", description = "分销商实体")
public class YunkeDistributor implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @Schema(description = "分销商ID")
    private Long id;

    @Schema(description = "用户ID")
    private Long userId;

    @Schema(description = "上级分销商ID")
    private Long parentId;

    @Schema(description = "分销商等级（1一级 2二级 3三级）")
    private Integer level;

    @Schema(description = "邀请码")
    private String inviteCode;

    @Schema(description = "分销商昵称")
    private String nickname;

    @Schema(description = "分销商头像")
    private String avatar;

    @Schema(description = "联系手机号")
    private String mobile;

    @Schema(description = "联系微信号")
    private String wechat;

    @Schema(description = "收款账户类型（1支付宝 2微信 3银行卡）")
    private Integer accountType;

    @Schema(description = "收款账户")
    private String accountInfo;

    @Schema(description = "收款户名")
    private String accountName;

    @Schema(description = "总佣金金额")
    private BigDecimal totalCommission;

    @Schema(description = "已提现金额")
    private BigDecimal withdrawnAmount;

    @Schema(description = "可提现金额")
    private BigDecimal availableAmount;

    @Schema(description = "累计推广用户数")
    private Integer totalInviteUsers;

    @Schema(description = "累计推广订单数")
    private Integer totalInviteOrders;

    @Schema(description = "当月佣金")
    private BigDecimal monthCommission;

    @Schema(description = "当月推广数")
    private Integer monthInviteCount;

    @Schema(description = "审核状态（0待审核 1已通过 2已拒绝）")
    private Integer auditStatus;

    @Schema(description = "审核意见")
    private String auditRemark;

    @Schema(description = "审核时间")
    private Long auditTime;

    @Schema(description = "审核人ID")
    private Long auditorId;

    @Schema(description = "分销商状态（0正常 1冻结 2禁用）")
    private Integer distributorStatus;

    @Schema(description = "申请时间")
    private Long applyTime;

    @Schema(description = "激活时间")
    private Long activeTime;

    @Schema(description = "最后活跃时间")
    private Long lastActiveTime;

    @Schema(description = "推广链接")
    private String promoteUrl;

    @Schema(description = "推广二维码")
    private String promoteQrcode;

    @Schema(description = "备注信息")
    private String remark;

    @Schema(description = "扩展信息（JSON格式）")
    private String extInfo;

    @Schema(description = "状态（0正常 1删除）")
    private Integer status;

    @Schema(description = "创建时间")
    private Long createTime;

    @Schema(description = "更新时间")
    private Long updateTime;
} 